import 'package:flutter/material.dart';

import '../ImageStudy.dart';
import '../demo/ContainerDemo.dart';
import '../demo/StackDemo.dart';

class LayoutDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return SingleChildScrollView(
      child: Column(
        children: [
          Text(
            "基本的文字",
            style: TextStyle(
              color: Colors.pink,
              decoration: TextDecoration.none,
            ),
          ),
          RichText(
            text: TextSpan(
              style: DefaultTextStyle.of(context).style,
              children: <InlineSpan>[
                TextSpan(
                  text: 'Hello',
                  style: TextStyle(fontWeight: FontWeight.bold),
                ),
                TextSpan(
                  text: ' beautiful ',
                  style: TextStyle(color: Colors.red),
                ),
                TextSpan(
                  text: 'world',
                  style: TextStyle(decoration: TextDecoration.underline),
                ),
                TextSpan(text: '这是文字 '),
                WidgetSpan(
                  child: Icon(Icons.star, color: Colors.amber, size: 16),
                  alignment: PlaceholderAlignment.middle,
                ),
                TextSpan(text: ' 这也是文字'),
              ],
            ),
          ),
          imageStudy(),
          ContainerDemo(),
          Container(
            color: Colors.orangeAccent,
            width: 100,
            height: 100,
            child: StackDemo(),
          )
        ],
      ),
    );;
  }

}